package com.example.dakotanews.dto;

import com.example.dakotanews.entity.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @description 用户属性信息中的关注用户的信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FollowUserDTO {

    private Integer id;
    private String avatar;
    private String name;
    private String headline;
    private int followers;

    public FollowUserDTO(User user) {
        this.id = user.getId();
        this.avatar = user.getProfile();
        this.name = user.getNickname();
        this.headline = user.getIntroduction();
        this.followers = user.getFollowerNum();
    }
}
